import { useStore } from "vuex";

export function usePremission(pageName: string, hanldeName: string) {
  const store = useStore();
  const permission = store.state.login.premission;
  const verifyPremissions = `system:${pageName}:${hanldeName}`;
  return !!permission.find((item: any) => item === verifyPremissions);
}
